<?php

namespace app\admin\controller;

use think\facade\Session;
use app\admin\controller\Base;
use app\common\model\Subscribe as SubscribeModel;

class Subscribe extends Base
{
    public function initialize()
    {
        parent::initialize();
        $this->Model = new SubscribeModel();
    }

    public function export(){
        $param = $this->request->param();
        $default_param = $this->index_default_param();
        $this->Model->exportExcel(array_merge($param, $default_param));
    }

    /**
     * 显示创建资源表单页.
     *
     * @return \think\Response
     */
    public function create()
    {
        // 用户不能创建一级栏目分类
        $this->redirect(url('index'));
    }

    /**
     * 保存更新的资源
     *
     * @param  \think\Request  $request
     * @param  int  $id
     * @return \think\Response
     */
    public function update($id = 0)
    {
        $this->redirect(url('index'));
    }

    public function delete($id = 0){
        $this->redirect(url('index'));
    }

    public function resort(){
        $this->redirect(url('index'));
    }
}
